<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>运维管理平台</title>
        <link href="/static/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <script src="/static/js/jquery.min.js"></script>
	    <script src="/static/js/bootstrap.min.js"></script>
</head>

<body class="nav-md">
        <div class="container body">
            <div class="main_container">
                <div class="col-md-3 left_col">
                    <div class="left_col scroll-view">
                        <div class="profile">
                            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                                <div class="menu_section">
                                    <ul class="nav side-menu">

                                        <form action="user_add" method="post">
                                            <input type="text" name="user" placeholder="用户名"/>
                                            <input type="password" name="pwd" placeholder="密码"/>

                                            <select name="gid">
                                                    {% for group in usergroup_list %}
                                                    <option value="{{ group.uid }}" >{{ group.caption }}</option>
                                                     {% endfor %}
                                            </select>
                                            <input type="submit" value="添加"/>



                                        </form>
                                        <div>
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                    <tr >
                                                        <th width="30%">序列号</th>
                                                        <th width="30%">用户名</th>
                                                        <th width="30%">业务组</th>
                                                        <th colspan="2" width="30%">操作</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                        {% for u in  user_list %}
                                                    <tr>
                                                        <td>{{ forloop.counter }}</td>
                                                        <td>{{ u.username }}</td>
                                                        <td>{{ u.user_group.caption }}</td>
                                                        <td><a href="/op/user_del-{{ u.id }}">删除</a></td>
                                                        <td><a href="/op/user_edit-{{ u.id }}">编辑</a></td>

                                                    </tr>
                                                        {% endfor %}
                                                </tbody>
                                            </table>
                                        </div>
                                    </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
</body>
</html>